<div class="content-left content-double">
    <h1>Members in: <?= $this->escape($this->group->name) ?></h1>
    
    <?php if ($this->group->is_default) : ?>
    <div class="frame-input">
        <div class="frame-content">
            <p><strong>Everyone is member of default groups.</strong></p>
        </div>
    </div>
    <?php else : ?>
    <div class="frame-input">
        <table class='shaded' style="width: 100%">
            <caption>
                Members
            </caption>
            <thead>
                <tr>
                    <th>Name</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach ($this->members as $member) : ?>
                <tr>
                    <td><?= $this->escape($member->name); ?></td>
                    <td style="text-align: center;">
                        <a href="<?= $this->url(array('module' => 'user', 'controller' => 'group', 'action' => 'remove-user', 'group' => $this->group->id, 'user' => $member->id), null, true); ?>">
                            Remove
                        </a>
                    </td>
                </tr>
            <?php endforeach;?>
            </tbody>
        </table>
    </div>
    
    <br/>
    
    <div class="frame-input">
        <table class='shaded' style="width: 100%">
            <caption>
                Non members
            </caption>
            <thead>
                <tr>
                    <th>Name</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach ($this->nonMembers as $nonMember) : ?>
                <tr>
                    <td><?= $this->escape($nonMember->name); ?></td>
                    <td style="text-align: center">
                        <a href="<?= $this->url(array('module' => 'user', 'controller' => 'group', 'action' => 'add-user', 'group' => $this->group->id, 'user' => $nonMember->id), null, true); ?>">
                            Add
                        </a>
                    </td>
                </tr>
            <?php endforeach;?>
            </tbody>
        </table>
    </div>
    <?php endif; ?>
    
</div>

<div class="content-right content-half">
   
    <h1>Other options</h1>
    
    <div class="frame-input">
        <div class="frame-content">
             <div class="button-small">
                <a href="<?= $this->url(array('module' => 'user', 'controller' => 'group', 'action' => 'edit', 'group' => $this->group->id), null, true) ?>">Back</a>
            </div>
        </div>
    </div>

</div>